home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qsignalmapper.h.z / qsignalmapper.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  1.6 KB  |  63 lines

  1. /****************************************************************************
  2. ** $Id: qsignalmapper.h,v 1.4 1998/07/03 00:09:41 hanord Exp $
  3. **
  4. ** Definition of QSignalMapper class
  5. **
  6. ** Created : 980503
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QSIGNALMAPPER_H
  25. #define QSIGNALMAPPER_H
  26.  
  27. #ifndef QT_H
  28. #include "qobject.h"
  29. #endif // QT_H
  30.  
  31.  
  32. class  QSignalMapperData;
  33. struct QSignalMapperRec;
  34.  
  35.  
  36. class QSignalMapper : public QObject {
  37.     Q_OBJECT
  38. public:
  39.     QSignalMapper( QObject* parent, const char* name=0 );
  40.     ~QSignalMapper();
  41.  
  42.     void setMapping( const QObject* sender, int identifier );
  43.     void setMapping( const QObject* sender, const char* identifier );
  44.     void removeMappings( const QObject* sender );
  45.  
  46. signals:
  47.     void mapped(int);
  48.     void mapped(const char*);
  49.  
  50. public slots:
  51.     void map();
  52.  
  53. private:
  54.     QSignalMapperData* d;
  55.     QSignalMapperRec* getRec( const QObject* );
  56.  
  57. private slots:
  58.     void removeMapping();
  59. };
  60.  
  61.  
  62. #endif // QSIGNALMAPPER_H
  63.